//
//  AROtherBottomV.m
//  BrushFace
//
//  Created by timer_q on 16/1/16.
//  Copyright © 2016年 Zzz. All rights reserved.
//

#import "AROtherBottomV.h"
#import "ARRequestModel.h"

@implementation AROtherBottomV


- (IBAction)sendBtnClick:(UIButton *)button {
    
    [self.textView resignFirstResponder];
    
    if(button.selected)
    {
        return;
    }
    
    button.selected = YES;
    button.tag = 1000;
    
    [self performSelector:@selector(timeEnough) withObject:nil afterDelay:3.0];
    
    [[ ARRequestModel sharedInstance] sendPingLunWithText:self.textView.text andCB:^(id output) {
        
        self.textView.text = @"";
        if ([[NSString stringWithFormat:@"%@",[output objectForKey:@"result"]] integerValue]==1)
        {
            
            [self.delegate sendMsgSuccess];
        }
    }];
    
}


- (void)timeEnough

{
    
    UIButton *btn = (UIButton*)[self viewWithTag:1000];
    
    btn.selected = NO;
    
}

@end
